package the.workshop.bu.dto.req;

import lombok.Data;
import org.springframework.beans.BeanUtils;
import the.workshop.bu.entity.CustomerTel;

import java.util.Date;

@Data
public class CustomerTelModifyReq {

    private Integer id;
    private String telNumber;
    private Integer isLegal;
    private Integer isInvalid;

    public CustomerTel toCustomerTel() {
        CustomerTel customerTel = new CustomerTel();
        BeanUtils.copyProperties(this, customerTel);
        customerTel.setModifiedTime(new Date());
        return customerTel;
    }
}
